﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Administrator/Admin.master" CodeBehind="AdminCustomersCategorys.aspx.cs" Inherits="EHTWebsiteProject.Administrator.AdminCustomersCategorys" %>
<%@ Register Src="~/Administrator/Controls/PaggingControl.ascx" TagName="PaggingControl"
    TagPrefix="EHT" %>
<asp:Content ContentPlaceHolderID="MainContent" runat="server" ID="center">
    <h1>
        <asp:Label ID="lbAdminCategory" runat="server" Text="Danh sách Danh Mục Khách Hàng"></asp:Label>
    </h1>
     <p class="submitButton">
        <asp:Button ID="btnAdd" runat="server" Text="Thêm mới danh mục tin khách hàng" 
            onclick="btnAdd_Click" CssClass="btn_action" />
    </p>
    <asp:Repeater ID="rpDanhMucKhachHang" runat="server" 
        onitemcommand="rpDanhMucKhachHang_ItemCommand">
         <HeaderTemplate>
            <table cellspacing="0" cellpadding="0" class="data-table">
                <thead>
                    <tr>
                         <th class="actions delete">
                            STT
                        </th>
                        <th class="actions edit">
                            Sửa
                        </th>
                        <th class="actions delete">
                            Xóa
                        </th>
                        <th>
                            Ten Danh Muc Khach Hang (VN)
                        </th>
                        <th class="OtherLanguage">
                            Ten DanhMuc Khach Hang (Other)
                        </th>
                         <th  class="number_of_order">
                            Thứ tự
                            <asp:ImageButton ID="ibtnSaveAll" ImageUrl="Templates/Images/save_all.jpg" Height="20"
                                Width="20" OnClientClick="return confirm('Bạn muốn lưu ?');" runat="server" BorderStyle="None"
                                CommandName="save_all" />
                        </th>
                        <th class="publish">
                            Hiển thị
                        </th>
                    </tr>
                </thead>
                <tbody>
        </HeaderTemplate>
        <ItemTemplate>
             <tr>
                  <td>
                    <%#Eval("IndexId")%>
                </td>
                <td class="actions edit">
                    <a href='AdminCustomerCategoryIU.aspx?DanhMucKhachHangID=<%#Eval("DanhMucKhachHangID")%>'>
                        <img alt="Edit" src="Templates/Images/Edit.png"></a>
                         <asp:Literal ID="ltrDanhMucKhachHangID" runat="server" Visible="false" Text='<%#Eval("DanhMucKhachHangID")%>'></asp:Literal>
                </td>
                <td class="actions delete">
                    <a href='#'>
                        <asp:ImageButton ID="btnDelete" ToolTip="Delete" CommandArgument='<%#Eval("DanhMucKhachHangID")%>'
                            CommandName="delete1" runat="server" ImageUrl="Templates/Images/Delete.png" OnClientClick="return confirm('Bạn có muốn xóa danh mục tin tức này không ?');  " />
                </td>
                <th>
                    <%#Eval("TenDanhMucKhachHangVN")%>
                </th>
                <th class="OtherLanguage">
                    <%#Eval("TenDanhMucKhachHangOther")%>
                </th>
                <td>
                    <asp:TextBox ID="txtNumberOfOrder" Width="30" runat="server" Text='<%#Eval("NumberOfOrder")%>'></asp:TextBox>
                    <asp:ImageButton Width="16" Height="16" ID="btnSaveNumberOfOrder" CommandName="change_number_of_order"
                        CommandArgument='<%#Eval("DanhMucKhachHangID") %>' ImageUrl="Templates/Images/save.jpg"
                        runat="server" />
                </td>
                 <td>
                        <asp:CheckBox ID="ckPublish" runat="server" Checked='<%#Eval("Publish")%>' Visible="false" />
                        <asp:ImageButton Width="16" Height="16" ID="btnPublish" CommandName="publish" CommandArgument='<%#Eval("DanhMucKhachHangID") %>'
                            ImageUrl="Templates/Images/btncheck.png" runat="server" />
                    </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
              </tbody> </table>
        </FooterTemplate>
    </asp:Repeater>
     <p>
        <eht:paggingcontrol id="PaggingControl1" runat="server" pageurl="AdminCustomersCategorys.aspx"
            pagesize="10" />
    </p>
 </asp:Content>  
